#ifndef __GS_GASSERVER_H__
#define __GS_GASSERVER_H__

#define GS_TANK_NUM    16

#define __TEST__ 

#include <pthread.h>
#include <unistd.h>

#include "tank.h"
#include "leak.h"
#include "hctable.h"

typedef void (* DATACALLBACK) (GS_TANK* tank);

DATACALLBACK gs_data_callback;
DATACALLBACK gs_alarm_callback;
DATACALLBACK gs_wrong_callback;
DATACALLBACK gs_leak_callback;
DATACALLBACK gs_oilling_callback;

typedef struct
{
    char code[8];
    char name[128];
    char user[16];
    char password[16];
    int leak_time; 
    int leak_value;
    int tanks_nr;
    GS_TANK tanks[16];
} GS;

GS g_gs;

char* g_curr_pwd;
char* g_curr_user;

#define LineEx(hdc, x1, y1, x2, y2) MoveTo (hdc, x1, y1); LineTo(hdc, x2, y2)
#endif
